package com.cyl.h5.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cyl.manager.del.domain.LbsLbt;
import com.cyl.manager.del.mapper.LbsLbtMapper;


@RestController
@RequestMapping("/no-auth")
public class H5LbtController {
	
    @Autowired
    private LbsLbtMapper lbsLbtMapper;

    @GetMapping("/lbt/getLbtList")
    public ResponseEntity<List<LbsLbt>> getHomeConfig(Long zbjid) {
    	QueryWrapper<LbsLbt> queryWrapper = new QueryWrapper<LbsLbt>();
    	queryWrapper.eq("del_flag", 0);
    	if(zbjid!=null) {
        	queryWrapper.eq("dept_zbj_id", zbjid);
    	}else {
    		queryWrapper.isNotNull("dept_zbj_id");
    	}
    	queryWrapper.orderByAsc("px");
        return ResponseEntity.ok(lbsLbtMapper.selectList(queryWrapper));
    }
     
}
